package com.kitchen.ui.controls.friends.button
{
	import com.kitchen.AbstractButton;
	
	import flash.display.BitmapData;
	import flash.events.MouseEvent;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	
	public class RandtoButton extends AbstractButton
	{
		public function RandtoButton(bitMapData:BitmapData)
		{
			super(bitMapData);
		}
		
		override protected function getBitmapData(bitdata:BitmapData):BitmapData{
			this.w = 78;
			this.h = 30;
			var cbitdata:BitmapData = new BitmapData(this.w*3, this.h);
			cbitdata.copyPixels(bitdata, new Rectangle(238, 410, this.w*3, this.h), new Point());
			return cbitdata;
		}
		
		override protected function onMouseOver(me:MouseEvent):void{
			this.offsetX(this.w+1);
		}
		
		override protected function onMouseDown(me:MouseEvent):void{
			this.offsetX(this.w*2+2);
		}
	}
}